<?php if (!defined('BASEPATH')) exit('No direct script access allowed');function generate_pdf($object, $filename='', $orientation = 'portrait', $direct_download=TRUE){	require_once("dompdf/dompdf_config.inc.php");	$dompdf = new DOMPDF();	$dompdf->set_paper("a4", $orientation ); 	$dompdf->load_html($object);	$dompdf->render();		if($direct_download==TRUE)	{		$dompdf->stream($filename);	}	else	return $dompdf->output();	}?>